package com.kantboot.tool.edu.repository;

import com.kantboot.tool.edu.domain.entity.ToolEduMajorDegree;
import jakarta.transaction.Transactional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface ToolEduMajorDegreeRepository extends JpaRepository<ToolEduMajorDegree,Long> {

    /**
     * 根据学科编码删除
     */
    @Modifying
    @Transactional
    @Query("delete from ToolEduMajorDegree where majorSubjectCode = ?1")
    void deleteByMajorSubjectCode(String majorSubjectCode);

}
